package com.easy.frame.common.redis.lock;

import com.easy.frame.common.redis.RedisUtil;

/**
 * Redis分布式锁
 *
 * @author zzf
 * @date 2020/6/23 16:58
 */
public class RedisLock {

    private static final String DEFAULT_VAL = "1";

    public static void lock(String key) {
        RedisUtil.getInstance().setIfAbsent(key, DEFAULT_VAL);
    }

}
